﻿using ED.Common.BaseModel;
using ED.IService.User;
using ED.Model;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace ED.Admin.Controllers
{
    /// <summary>
    /// 用户管理
    /// </summary>
    public class UserController : CommonController
    {
        private readonly IUserService _userService;

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="userService"></param>
        public UserController(IUserService userService)
        {
            _userService = userService;
        }
        /// <summary>
        /// 登录
        /// </summary>
        /// <returns></returns>
        [HttpPost]
        public ResponseOutput Login(UserInfoReq req)
        {
            var res = _userService.Login(req);
            return ResponseOutput.Ok(res);
        }
    }
}
